package com.ruoyi.womp.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.womp.mapper.WompHandlingOpinionsMapper;
import com.ruoyi.womp.domain.WompHandlingOpinions;
import com.ruoyi.womp.service.IWompHandlingOpinionsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 意见建议库Service业务层处理
 * 
 * @author mzz
 * @date 2022-04-11
 */
@Service
public class WompHandlingOpinionsServiceImpl implements IWompHandlingOpinionsService 
{
    @Autowired
    private WompHandlingOpinionsMapper wompHandlingOpinionsMapper;

    /**
     * 查询意见建议库
     * 
     * @param id 意见建议库主键
     * @return 意见建议库
     */
    @Override
    public WompHandlingOpinions selectWompHandlingOpinionsById(Integer id)
    {
        return wompHandlingOpinionsMapper.selectWompHandlingOpinionsById(id);
    }

    /**
     * 查询意见建议库列表
     * 
     * @param wompHandlingOpinions 意见建议库
     * @return 意见建议库
     */
    @Override
    public List<WompHandlingOpinions> selectWompHandlingOpinionsList(WompHandlingOpinions wompHandlingOpinions)
    {
        return wompHandlingOpinionsMapper.selectWompHandlingOpinionsList(wompHandlingOpinions);
    }

    /**
     * 新增意见建议库
     * 
     * @param wompHandlingOpinions 意见建议库
     * @return 结果
     */
    @Override
    public int insertWompHandlingOpinions(WompHandlingOpinions wompHandlingOpinions)
    {
        wompHandlingOpinions.setCreateTime(DateUtils.getNowDate());
        return wompHandlingOpinionsMapper.insertWompHandlingOpinions(wompHandlingOpinions);
    }

    /**
     * 修改意见建议库
     * 
     * @param wompHandlingOpinions 意见建议库
     * @return 结果
     */
    @Override
    public int updateWompHandlingOpinions(WompHandlingOpinions wompHandlingOpinions)
    {
        wompHandlingOpinions.setUpdateTime(DateUtils.getNowDate());
        return wompHandlingOpinionsMapper.updateWompHandlingOpinions(wompHandlingOpinions);
    }

    /**
     * 批量删除意见建议库
     * 
     * @param ids 需要删除的意见建议库主键
     * @return 结果
     */
    @Override
    public int deleteWompHandlingOpinionsByIds(String ids)
    {
        return wompHandlingOpinionsMapper.deleteWompHandlingOpinionsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除意见建议库信息
     * 
     * @param id 意见建议库主键
     * @return 结果
     */
    @Override
    public int deleteWompHandlingOpinionsById(Integer id)
    {
        return wompHandlingOpinionsMapper.deleteWompHandlingOpinionsById(id);
    }
}
